#include <stdio.h>

int sum_min_max(float scores[]){
    float min = scores[0];
    float max = scores[0];
    int sum = 0;
    for(int i = 1; i <= 10; i++){
      sum += scores[i];
      if (scores[i] < min) {
	min = scores[i];
      }
      if (scores[i] > max) {
	max = scores[i];
      }      
    }
    return sum-min-max;
}
int main() {
    float scores[10];
    float sum = 0;
    printf("请输入10个评委的分数：\n");
    for (int i = 0; i < 10; i++) {
        scanf("%f", &scores[i]);
    }
    float average = sum_min_max(scores)/ 8;

    printf("平均得分是：%.2f\n", average);

    return 0;
}
